<?php

class ProductPriceHistory extends AppModel {

    var $name = 'ProductPriceHistory';
    var $belongsTo = array(
        'User' => array(
            'foreignKey' => 'collector_id'
        )
    );

    function save($product_id, $type, $price, $collector_id) {
        $data = array();
        $data['ProductPriceHistory']['id'] = null;
        $data['ProductPriceHistory']['product_id'] = $product_id;
        $data['ProductPriceHistory']['type'] = $type;
        $data['ProductPriceHistory']['price'] = $price;
        $data['ProductPriceHistory']['collector_id'] = $collector_id;
        parent::save($data);
    }
}

?>
